<div class="layui-card-body" style="line-height: 36px;font-size: 14px;">
    <style>.layui-layer-content{height: 650px  }</style>
    <div class="layui-row margin-bottom-12">
        <label class="layui-col-xs6 think-form-label">标题：{$info.title}</label>
        <label class="layui-col-xs6 think-form-label">整合时间：{$info.create_at|date='Y年m月d日 H时i分s秒'}</label>
    </div>
    <div class="layui-row margin-bottom-12">
        <label class="layui-col-xs6 think-form-label">整合人账号：{$info.admin_name}</label>
        <label class="layui-col-xs6 think-form-label">整合人昵称：{$info.admin_nickname}</label>
    </div>
    <div class="layui-row margin-bottom-12">
        <button class="layui-btn layui-btn-primary" type='submit' style="float: right;margin-left: 20px" data-modal='{:url("plan_log")}?id={$info.id}'>明  细</button>
        <button id="btn" class="layui-btn" type='submit' style="float: right;">导  出</button>
    </div>
    <div class="layui-row margin-bottom-15">
        <table class="layui-table margin-top-10 table2excel" lay-skin="line" id='dataInfo' lay-filter="demo">
            <thead>
            <tr>
                <th class="text-center">物资编码</th>
                <th class="text-center">物资名称</th>
                <th class="text-center">规格</th>
                <th class="text-center">单位</th>
                <th class="text-center">单价</th>
                <th class="text-center">计划数量</th>
                <th class="text-center">计划金额</th>
                <th class="text-center" style="display:none">需求单位</th>
                <th class="text-center noExl"></th>
            </tr>
            </thead>
            <tbody id="one_add">
            <style>
                th{text-align: center;}
                .burds{width:80%;height:28px;text-align: center;border: none;}
            </style>
            {foreach $plan_list as $k=>$v}
            <tr data-dbclick>
                <td class='text-center'>{$v.material_code|default=''}</td>
                <td class='text-center'>{$v.material_name|default=''}</td>
                <td class='text-center'>{$v.material_model|default=''}</td>
                <td class='text-center'>{$v.material_unit|default=''}</td>
                <td class='text-center'>{$v.material_price|default=''}</td>
                <td class='text-center'>{$v.material_num|default=''}</td>
                <td class='text-center'>{$v.material_xjprice|default=0}</td>
                <td class='text-center' style="display:none">
                    {foreach $v.info as $ks=>$vs}
                        {$vs.admin_name}：{$vs.material_num}&nbsp;&nbsp;
                    {/foreach}
                </td>
                <td class='text-center noExl'>
                    {if auth("detail_zi")}
                    <a data-title="详 情" data-dbclick class="layui-btn layui-btn-xs layui-btn-normal" data-modal='{:url("detail_zi")}?id={$info.id}&material_code={$v.material_code}'>明 细</a>
                    {/if}
                </td>
            </tr>
            {/foreach}
            <tr>
                <td class='text-center'>总计</td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td class='text-center' id="total" style="color: red">{$total}</td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<div class="hr-line-dashed"></div>
<div class="layui-form-item text-center">
    <button class="layui-btn layui-layer-close layui-layer-close1" type='submit'>关闭</button>
</div>
<script src="__ROOT__/static/jquery.table2excel.js"></script>
<script>
    $(function() {
        $("#btn").click(function(){
            $(".table2excel").table2excel({
                exclude: ".noExl",
                name: "物资计划",
                filename: "{$info.title}",
                exclude_img: true,
                exclude_links: false,
                exclude_inputs: true
            });
        });
    });
</script>